package router

import (
	platformController "gitee.com/wangshh_123/cross-pay-go/src/controller/platform"
	"gitee.com/wangshh_123/cross-pay-go/src/middleware"
	"github.com/gin-gonic/gin"
)

// SetupHlPayAccountBalanceRouter 设置HlPay账户余额路由
func SetupHlPayAccountBalanceRouter(api *gin.RouterGroup) {
	// 创建HlPay账户余额控制器实例
	hlpayAccountBalanceController := platformController.NewHlPayAccountBalanceController()

	// HlPay账户余额路由组
	hlpayAccountBalance := api.Group("/hlpay-account-balance")
	{
		// 获取账户余额列表 - 根据用户矩阵账户自动获取
		hlpayAccountBalance.GET("/", middleware.AuthMiddleware(), middleware.MatrixAccountMiddleware(), hlpayAccountBalanceController.GetAccountBalances)

		// 获取账户列表（适配 PhotonPay 格式）
		hlpayAccountBalance.GET("/list", middleware.AuthMiddleware(), middleware.MatrixAccountMiddleware(), hlpayAccountBalanceController.GetAccountList)

		// 根据账户号获取账户余额
		hlpayAccountBalance.GET("/:accountNo", middleware.AuthMiddleware(), middleware.MatrixAccountMiddleware(), hlpayAccountBalanceController.GetAccountBalanceByAccountNo)

		// 获取总余额
		hlpayAccountBalance.GET("/total", middleware.AuthMiddleware(), middleware.MatrixAccountMiddleware(), hlpayAccountBalanceController.GetTotalBalance)
	}
}
